<template>
<div class="index">
  <IndexTop></IndexTop>
  <IndexMain></IndexMain>
</div>
</template>

<script>
// // 导入自定义标签
import IndexTop from "./index/index-top.vue";
import IndexMain from "./index/index-main.vue";
import {waimai_index} from '../api/index'

export default {
  data() {
    return {
      render: null,
    };
  },
  components: {
    IndexTop,
    IndexMain
  },
  mounted() {
    // 挂载完成时，发送请求
    waimai_index().then((res) => {
      if (res.data.code == 200) {
        this.render = res.data.list;
        // this.b=
      }
    });
  },
};
</script>

<style lang="css" scoped>
</style>